package org.hdl.anima.message;

import java.io.IOException;

import org.hdl.anima.common.io.InputArchive;
import org.hdl.anima.common.io.OutputArchive;

/**
 * 
 * @author qiuhd
 * @since  2014年9月1日
 */
public class HandShakeResp extends ResponseAdapter {
	
	private String reconnectToken;
	private int heartTime;
	private int maxMessageSize;

	@Override
	public void doSerialize(OutputArchive out) throws IOException {
		out.writeString(reconnectToken);
		out.writeInt(heartTime);
		out.writeInt(maxMessageSize);
	}

	@Override
	public void doDeserialize(InputArchive in) throws IOException {
		this.reconnectToken = in.readString();
		this.heartTime = in.readInt();
		this.maxMessageSize = in.readInt();
	}

	public String getReconnectToken() {
		return reconnectToken;
	}

	public void setReconnectToken(String reconnectToken) {
		this.reconnectToken = reconnectToken;
	}

	public int getHeartTime() {
		return heartTime;
	}

	public void setHeartTime(int heartTime) {
		this.heartTime = heartTime;
	}

	public int getMaxMessageSize() {
		return maxMessageSize;
	}

	public void setMaxMessageSize(int maxMessageSize) {
		this.maxMessageSize = maxMessageSize;
	}
}

